package com.ruoyi.train.mapper;

import com.ruoyi.train.domain.Train;
import com.ruoyi.train.domain.TrainOwnTrainListVo;
import com.ruoyi.train.domain.TrainTotalExportVo;
import com.ruoyi.train.domain.TrainType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 培训Mapper接口
 *
 * @author 钟彧
 * @date 2022-08-25
 */
public interface TrainMapper {

    /**
     * 查询培训
     *
     * @param trainId 培训主键
     * @return 培训
     */
    public Train selectTrainByTrainId(@Param("trainId") String trainId, @Param("userId") Long userId);

    /**
     * 查询培训列表
     *
     * @param train 培训
     * @return 培训集合
     */
    public List<Train> selectTrainList(Train train);

    /**
     * 新增培训
     *
     * @param train 培训
     * @return 结果
     */
    public int insertTrain(Train train);

    /**
     * 查询用印类型
     *
     * @return 用印类型集合
     */
    public List<TrainType> queryTrainType();

    /**
     * 批量删除培训
     *
     * @param trainIds 需要删除的培训主键集合
     * @param userId   用户id
     * @return int 结果
     */
    public int deleteTrainByTrainIds(@Param("trainIds") String[] trainIds, @Param("userId") Long userId);

    public int masterApproval(Train train);

    public List<Train> selectTrainByGroup(Train train);

    public List<TrainOwnTrainListVo> selectOwnTrainList(Long userId);

    public List<TrainTotalExportVo> selectList(@Param("ids") String[] ids);

    public List<TrainTotalExportVo> selectListAll();

    public List<String> getDept();
}
